<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    //方式一
    var str1 = new String("abc");
    //方式二
    var str2 = "abc";

    //alert(str2.length)

    //trim()去除字符串前后两端的空白字符
    var str3 = '   abc       ';
    alert(1+str3.trim()+1)
</script>
</body>
</html>